#include "image.h"

int bytes_per_voxel(CubeType type) {
	switch(type) {
		case CubeType::U8:
		case CubeType::I8:
			return 1;
		case CubeType::U16:
		case CubeType::I16:
			return 2;
		case CubeType::U32:
		case CubeType::I32:
			return 4;
		case CubeType::U64:
		case CubeType::I64:
			return 8;
		case CubeType::F32:
			return 4;
		case CubeType::F64:
			return 8;
		default:
			return 0;
	}
}

